package nl.grol.yakshop.test;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import nl.grol.yakshop.domain.model.ProcessedOrder;
import nl.grol.yakshop.domain.model.YakHerd;
import nl.grol.yakshop.domain.repository.RepositoryI;
import nl.grol.yakshop.util.YakShopException;

public class MockedRepository implements RepositoryI {
	private int day;
	private double milkOrdered;
	private int skinsOrderd;
	
	public MockedRepository( int day, double milkOrdered, int skinsOrderd ) {
		this.day = day;
		this.milkOrdered = milkOrdered;
		this.skinsOrderd = skinsOrderd;
	}
	
	@Override
	public YakHerd getHerd() throws YakShopException {
		return TestUtil.createExampleHerd();
	}

	@Override
	public void persistProcessedOrder(ProcessedOrder processedOrder) {
		// TODO Auto-generated method stub

	}

	@Override
	public List<ProcessedOrder> getProcessedOrdersBeforeDay(int beforeDay) {
		List<ProcessedOrder> orders= new ArrayList<ProcessedOrder>();
		orders.add( 
				new ProcessedOrder(this.day, 
									new Date(), 
									"Tester", 
									this.milkOrdered, 
									this.skinsOrderd)
		);
		
		return orders;
	}

	@Override
	public List<ProcessedOrder> getAllProcessedOrders() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<ProcessedOrder> getProcessedOrdersForCustomer(
			String submitterName) {
		// TODO Auto-generated method stub
		return null;
	}

}
